home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 3
/
Light ROM 3 - Disc 2.iso
/
programs
/
amiga
/
wasp
/
wasp121.lha
/
misc
/
PARAMETERS
< prev
next >
Wrap
Text File
|
1991-07-17
|
4KB
|
91 lines
explanation of the parameter options:
-hamcountmeth, -nonhamcountmeth:
possible values:
#define COUNTMETH_ALL_1 0
#define COUNTMETH_ALL_DIF 1
#define COUNTMETH_ALL_FIXDIF 2
#define COUNTMETH_JUMP_1 3
#define COUNTMETH_JUMP_21 4
#define COUNTMETH_JUMP_421 5
#define COUNTMETH_JUMP_8421 6
#define COUNTMETH_JUMP_DIF 7
#define COUNTMETH_JUMP_DIFSH 8
#define COUNTMETH_JUMP_FIXDIF 9
#define COUNTMETH_JUMP_FIXDIFSH 10
defaults:
#define DEF_HAMCOUNTMETH COUNTMETH_ALL_FIXDIF
#define DEF_NONHAMCOUNTMETH COUNTMETH_ALL_1
COUNTMETH_ALLs count all pixels, COUNTMETH_JUMPs count only pixels
whose color differs from the color of the previous pixel in at least two
of the components red, green and blue.
COUNTMETH_.._1s count all pixels as 1, COUNTMETH_.._DIFs and
COUNTMETH_.._FIXDIFs take the absolute difference of the color of the current
pixel and the color of the previous pixel, in the red, green and blue components,
eg. greendif=abs((curcolor&0x0f0)-(prevcolor&0x0f0)),
COUNTMETH_.._DIFs count as greendif+reddif+bluedif, COUNTMETH_.._FIXDIFs count as
the sum of the least two of greendif, reddif and bluedif.
COUNTMETH_JUMP_21, 421, 8421, DIFSH and FIXDIFSH all use shifting, for example
COUNTMETH_JUMP_421 counts the pixel where the jump occurs as 4, the next one as 2,
the next one as 1, even when no further jump occurs. If two jumps occur right behind
each other, the shift value is reset, so the first jump would count as 4, the second
jump as 4 too, and the next two pixels as 2 and 1.
DIFSH and FIXDIFSH count the first jump pixel in the same way as their non-shifting
pals DIF and FIXDIF do, then dividing this value by two (shifting it a pixel) for each
successive pixel, until the shift value becomes 0.
-threshold:
possible values: 0 .. MAX_UNSIGNED_LONG
default: 1
Only colors which occur at least threshold times are used by the color distribution,
except when doing so would cause a number of color registers to be unused, in that
case wasp will try to find the lowest possible threshold resulting in at least 16
different colors, in ham or hires mode, or at least 32 different colors, in lores
mode.
-distrmeth:
possible values:
#define DISTRMETH_MOSTUSED 0
#define DISTRMETH_WORSTFIRST 1
#define DISTRMETH_EHB 2
#define DISTRMETH_HAMSHARP 3
#define DISTRMETH_CONTRACTION 4
default:
#define DEF_DISTRMETH DISTRMETH_WORSTFIRST
When the number of different colors is larger than the number of color registers
available, colors will have to be distributed between the color registers.
DISTRMETH_MOSTUSED fills the nregs color registers with the nregs colors which
occur most.
DISTRMETH_WORSTFIRST assigns the two first color registers to the
two colors with the largest (manhattan) distance between them, the next color
register is filled with the color with the largest distance to any of the used
color registers, this process is repeated until all color registers are filled.
Then it goes on to group all colors according to closest color register,
the weighted average of all colors belonging to a certain color register forms the
new contents of the color register.
DISTRMETH_EHB is a modification of DISTRMETH_WORSTFIRST, to be used for conversion
to EHB only, and the only distribution method that can be used to convert to EHB.
Basically it does the same as DISTRMETH_WORSTFIRST, but when it has found a color
that has the largest distance to any of the used color registers at that moment it
fills one color register with this color, and another color register with the same
color with the red, green and blue values each shifted one bit to the right, or with
the red, green and blue values each shifted one bit to the left. In this way the color
registers are filled in pairs.
DISTRMETH_HAMSHARP computes x, the number of different colors used in the picture
divided by the number of color registers, then fills the first color register with
the color which has the smallest total difference to x used colors, including itself.
It then marks these x colors as done and repeats the process until all color registers
have been filled. It recomputes the color registers by grouping and averaging in
exactly the same way DISTRMETH_WORSTFIRST does.
DISTRMETH_CONTRACTION repeatedly contracts the two colors closest to each other to
a new color, by weighted averaging the two colors, until the number of remaining colors
equals the number of color registers.